In recent years, in communication devices such as mobile phones or the like that transmit and receive data in wireless communication networks for mobile phones or the like, a multiple determination operation for determining, on the basis of the regularity of a packet-specific length, specified between layers, whether or not a reception data length of a portion other than a header in a reception data is the integral multiple of the packet-specific length has been performed so as to confirm that the reception data is normal. The communication device performs a remainder calculation processing operation in which the reception data length is divided by a specified data length, and confirms that the reception data length is the integral multiple of the specified data length, when a remainder is zero.
For example, a technique is known in which the communication device performs the remainder calculation processing operation using a shift operation when an operand specified between layers is a power of 2. Since, in a data bit string that has a reception data length expressed by binary digits, a value indicated in lower digits than the most significant digit of an operand expressed by binary digits is a remainder, the communication device performs a right shift operation in which the data bit string is shifted to the right by (the most significant digit number of the operand −1) to calculate a remainder. In addition, the communication device confirms that the reception data is the integral multiple of the operand, when the calculated remainder is zero.
In addition, when the operand specified between layers is not a power of 2, the shift operation is not applied. Therefore, the communication device repeats subtracting the operand from the reception data length, calculates a final remainder, and determines whether or not the reception data is the integral multiple of the operand. In addition, another technique is known in which a communication device holds in advance, as fixed patterns, individual multiple values of an operand specified between layers, and determines whether or not the reception data is the integral multiple of the operand, by sequentially comparing the held fixed patterns with the reception data length.
In addition, examples of documents that disclose the techniques mentioned above include Japanese Laid-open Patent Publication No. 8-202534, Japanese Laid-open Patent Publication No. 8-36483, and Japanese Laid-open Patent Publication No. 10-307707.
When an operand specified between layers is not a power of 2, it is difficult for the communication device to perform at high speed a multiple determination operation for determining whether or not the reception data length is the integral multiple of the operand. Namely, the communication device repeats subtracting the operand from the reception data length until a remainder is calculated. Therefore, in the communication device, the number of subtraction increases in proportion to the length of the reception data, namely, in inverse proportion to the magnitude of the operand, thereby causing a significant reduction in the processing speed thereof. In addition, in the communication device, since the individual multiple values of the operand, held in advance, are sequentially compared with the reception data length, the number of comparison increases, thereby causing a reduction in the processing speed thereof.